#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 0, i = 0,j=0;
	scanf("%d", &n);
	int arr[20][20] = { 0 };
	for (i = 0; i <n; i++)
	{
		arr[i][0] = 1;
		for (j = 0; j <= i; j++)
		{
			if (i == j)
			{
				arr[i][j] = 1;
			}
			if(i>1&&j>=1)
			{
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}
		}


	}





	for (i = 0; i < n; i++)
	{
		for (j = 0; j <= i; j++)
		{
			printf("%d ", arr[i][j]);


		}
		printf("\n");

	}

	return 0;
}